-module(datasink).
-export([start/0]).
-import(werkzeug, [to_String/1, timeMilliSecond/0]).

start() ->
	receive 
		kill -> 
			io:format("IO shut down~n"),
			inactive();
		Message -> 
			io:format("~s - ~p~n", [timeMilliSecond(), lists:map(fun(A) -> mapper(A) end, Message)]),
			start()
	end.

inactive() ->
	receive
		_ -> inactive()
	end.

mapper(A) when A < 32 orelse A > 126 -> 32;
mapper(A) -> A.
	